package com.bestvike.stone.core.lang;

/**
 * Created by 许崇雷 on 2016/7/12.
 */
public final class OperatingSystem {
    private final Platform platform;
    private final String platformID;
    private final String version;
    private final String arch;

    //构造函数
    OperatingSystem(String platformID, String version, String arch) {
        this.platform = Platform.forName(platformID);
        this.platformID = platformID;
        this.version = version;
        this.arch = arch;
    }

    /**
     * 获取操作系统类型
     */
    public Platform getPlatform() {
        return this.platform;
    }

    /**
     * 获取操作系统名称
     */
    public String getPlatformID() {
        return this.platformID;
    }

    /**
     * 获取操作系统版本
     */
    public String getVersion() {
        return this.version;
    }

    /**
     * 获取操作系统架构
     */
    public String getArch() {
        return this.arch;
    }
}
